/**
 * Copyright 2006 Bosco Curtu
 * Licensed under the Apache License, Version 2.0 (the "License"); 
 * you may not use this file except in compliance with the License. 
 * 
 * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 
 * Unless required by applicable law or agreed to in writing, 
 * software distributed under the License is distributed on an "AS IS" BASIS, 
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, 
 * either express or implied. 
 * 
 * See the License for the specific language governing permissions and limitations 
 * under the License.
*/
package com.bcurtu.test;

import java.util.Calendar;
import java.util.Date;
import java.util.List;

import junit.framework.Assert;
import junit.framework.TestCase;

import org.apache.log4j.Logger;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.FileSystemXmlApplicationContext;

import com.bcurtu.db.Account;
import com.bcurtu.db.AccountDaoJdbc;
import com.bcurtu.james.JamesManager;
import com.sun.corba.se.impl.orb.ParserTable.TestContactInfoListFactory;


public class TelnetPool extends TestCase {

	public static final String CONTEXT_CONFIG_LOCATION = "bin/applicationContext.xml";
	public static final String CONTEXT_DB_CONFIG_LOCATION = "bin/applicationContext-db-test.xml";
	public static final String CONTEXT_JAMES_CONFIG_LOCATION = "bin/applicationContext-james.xml";

	private JamesManager james;
	private Logger log =Logger.getLogger(this.getClass());
	 

	protected void setUp(){
		ApplicationContext context = new FileSystemXmlApplicationContext(new String[]{
				CONTEXT_CONFIG_LOCATION,
				CONTEXT_DB_CONFIG_LOCATION,
				CONTEXT_JAMES_CONFIG_LOCATION,
		});
		james = (JamesManager) context.getBean("JamesManager");
	}

	public void test10Calls() throws Exception{
		
		String alias="uno";

		for (int i=0;i<10;i++){
			Assert.assertEquals("verifyFreeAccount "+alias,true,james.verifyFreeAccount(alias));
		}
	}
	
	


}
